package edu.ntu.cloudroid.nongui.com;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import edu.ntu.cloudroid.model.data.DetachedData;

/**
 * @author anhdinh All responses from server extends this For example, a
 *         response for location data contain a list of locations, for vital
 *         data a list of vital sign
 */
public class AbstractResponse implements Serializable {
	private String requesterId;
	private boolean accessDecision;

	private Map<String, Map<String,List<DetachedData>>> returnedData; // of string, Object:
															// <requested ID:
															//    <policy: List<DetachedData>>>

	public AbstractResponse(){
		
	}
	
	public AbstractResponse(String ri, boolean ad,
			Map<String, Map<String,List<DetachedData>>> returnedData) {
		this.requesterId = ri;
		this.accessDecision = ad;
		this.returnedData = returnedData;
	}

	public String getRequesterId() {
		return requesterId;
	}

	public boolean getAccessDecision() {
		return accessDecision;
	}

	public Map<String, Map<String,List<DetachedData>>> getReturnedData() {
		return returnedData;
	}

}
